import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from "path"
import electron from 'vite-plugin-electron'
import Components from 'unplugin-vue-components/vite'
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'

export default defineConfig({
  plugins: [
    vue(),
    electron({
      entry:"electron/main.js"
    }),
    Components({
      resolvers: [ElementPlusResolver()],
    })
  ],
  resolve: {
    alias: {
      '@': path.resolve('./src')
    }
  },
  server: {
    port: 5186,
    host: '0.0.0.0'
  },
  define: {
    'process.env': {
      BASE_URL: '/'
    }
  }
})
